package route

import (
	"bc/route/api/v1"
	"github.com/gin-gonic/gin"
)

func CallBackRouter(g *gin.RouterGroup){

	api_v1_group := g.Group("api/v1/call_back")
	//回调地址
	api_v1_group.POST("instance_offer_call_back",v1.InsOffer.CreateCallBack)
	api_v1_group.POST("instance_offer_del_call_back",v1.InsOffer.DelCallBack)
	api_v1_group.POST("instance_offer_update_call_back",v1.InsOffer.UpdateCallBack)
	api_v1_group.POST("change_instance_offering_state_call_back",v1.InsOffer.ChangeInstanceOfferingStateCallBack)

	api_v1_group.POST("image_add_call_back",v1.Image.CreateCallBack)
	api_v1_group.POST("image_del_call_back",v1.Image.DeleteCallBack)
	api_v1_group.POST("image_update_call_back",v1.Image.UpdateCallBack)

	api_v1_group.POST("image_server_add_call_back",v1.ImageServer.CreateCallBack)
	api_v1_group.POST("del_image_server_call_back",v1.ImageServer.DelImgServerCallBack)

	api_v1_group.POST("zone_add_call_back",v1.Zone.CreateCallBack)
	api_v1_group.POST("zone_del_call_back",v1.Zone.DeleteCallBack)
	api_v1_group.POST("zone_upd_call_back",v1.Zone.UpdateCallBack)
	api_v1_group.POST("zone_upd_state_call_back",v1.Zone.UpdateStateCallBack)
	api_v1_group.POST("to_zone_call_back",v1.ImageServer.ToZoneCallBack)

	api_v1_group.POST("l2_net_add_call_back",v1.NetWork.CreateCallBack)
	api_v1_group.POST("l2_net_del_call_back",v1.NetWork.DeleteCallBack)

	api_v1_group.POST("l3_net_add_call_back",v1.NetWork.L3CreatCallBack)
	api_v1_group.POST("l3_net_del_call_back",v1.NetWork.L3NetWorkDeleteCallBack)

	api_v1_group.POST("create_vm_call_back",v1.Vm.CreateVmCallBack)

	api_v1_group.POST("l2_net_edit_call_back",v1.NetWork.UpdateCallBack)

}
